/*
 * @# Photo.java 2011-12-26 下午08:00:37
 * 
 * Copyright (C) 2010 - 2011 广州羿安信息科技有限公司
 * Guangzhou ianswer information technology co. ltd.
 * 
 * All rights reserved!
 */
package com.ianswer.px.album.entity;

import javax.validation.constraints.NotNull;

import com.ianswer.px.album.io.AlbumPhotoSize;

/**
 * @author alvin hwang
 */
public class Photo {

	private Long id;
	@NotNull
	private Long albumId;
	@NotNull
	private Long userId;
	@NotNull
	private String url;
	private String title;
	private String tags;

	private Long createdAt;
	private String createdAtDuration;
	@NotNull
	private Long ipAddr;
	private int pageIndex;

	// 缓存数字
	private int visits;
	private int commentsTotal;
	private int comments;
	private int transferred;
	private int favors;
	private int likes;
	
	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getAlbumId() {
		return albumId;
	}

	public void setAlbumId(Long albumId) {
		this.albumId = albumId;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getTags() {
		return tags;
	}

	public void setTags(String tags) {
		this.tags = tags;
	}

	public Long getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Long createdAt) {
		this.createdAt = createdAt;
	}

	public Long getIpAddr() {
		return ipAddr;
	}
	
	public void setIpAddr(Long ipAddr) {
		this.ipAddr = ipAddr;
	}

	public int getPageIndex() {
		return pageIndex;
	}

	public void setPageIndex(int pageIndex) {
		this.pageIndex = pageIndex;
	}

	public int getVisits() {
		return visits;
	}

	public void setVisits(int visits) {
		this.visits = visits;
	}

	public int getCommentsTotal() {
		return commentsTotal;
	}

	public void setCommentsTotal(int commentsTotal) {
		this.commentsTotal = commentsTotal;
	}

	public int getComments() {
		return comments;
	}

	public void setComments(int comments) {
		this.comments = comments;
	}

	public int getTransferred() {
		return transferred;
	}

	public void setTransferred(int transferred) {
		this.transferred = transferred;
	}

	public int getFavors() {
		return favors;
	}

	public void setFavors(int favors) {
		this.favors = favors;
	}

	public int getLikes() {
		return likes;
	}

	public void setLikes(int likes) {
		this.likes = likes;
	}

	public String getH80Path() {
		return AlbumPhotoSize.H80.path(url);
	}

	public String getH160Path() {
		return AlbumPhotoSize.H160.path(url);
	}

	public String getH220Path() {
		return AlbumPhotoSize.H220.path(url);
	}

	public String getW900Path() {
		return AlbumPhotoSize.W900.path(url);
	}

	public String getH400Path() {
		return AlbumPhotoSize.H400.path(url);
	}

	public String getH600Path() {
		return AlbumPhotoSize.H600.path(url);
	}

	public String getCreatedAtDuration() {
		return createdAtDuration;
	}

	public void setCreatedAtDuration(String createdAtDuration) {
		this.createdAtDuration = createdAtDuration;
	}
	
}
